﻿using Code;
using System.Windows;
using System.Windows.Controls;

namespace github.heerheer.card2.UI.Views
{
    /// <summary>
    /// HomeView.xaml 的交互逻辑
    /// </summary>
    public partial class HomeView : UserControl
    {
        public HomeView()
        {
            InitializeComponent();
        }

        private void Button_ProHub(object sender, RoutedEventArgs e)
        {
            MessageBox.Show(AppMain.VipInfo.isVIP.ToString());
            if (AppMain.VipInfo.isVIP)
            {
                MainWindow.mainWindow.ContentCtrl.Content = new ProHubView();
            }
            else
            {
                var pc = new ProCheckView();
                pc.ShowDialog();
            }
        }

        private void Button_PoolEdit(object sender, RoutedEventArgs e)
        {
            MainWindow.mainWindow.ContentCtrl.Content = new PoolEditorView();
        }

        private void Button_Settings(object sender, RoutedEventArgs e)
        {
            MainWindow.mainWindow.ContentCtrl.Content = new SettingsView();
        }

        private void Button_News(object sender, RoutedEventArgs e)
        {
            MainWindow.mainWindow.ContentCtrl.Content = new NewsView();
        }
    }
}